#ifndef		__KEYBOARD_H__
#define		__KEYBOARD_H__



#include "def.h"
#include "interface.h"

#ifndef 	_GLOBAL_KEY_
		#define  KEY_EXTERN	extern
#else
		#define  KEY_EXTERN	
#endif

#define	 IOKEYMAX		12		
#define	 ADCKEYMAX 		1	
		

typedef struct 
{
	char name[10];
	BYTE index;
	BOOL bUpDownStatus[KEY_BOARD_MAX];
}KEY_DES;

typedef struct
{
	BYTE XXX;
	BYTE Turn1Code;
	BYTE Turn2Code;
	BOOL bKeyStatus[KEY_BOARD_MAX];
	KEY_DES keyDes;
	UINT32 keyBoardDelayTimer[KEY_BOARD_MAX];
	UINT32 keyBoardAdcDelayTimer;
	UINT32 turn1DelayTimerA;
	UINT32 turn1DelayTimerB;
	
	UINT32 turn2DelayTimerA;
	UINT32 turn2DelayTimerB;
}T_KEYBOARD_INFO;





KEY_EXTERN	T_KEYBOARD_INFO keyBoardInfo;


KEY_EXTERN void CanBoardProc(void);
KEY_EXTERN void CanBoardInit(void);
KEY_EXTERN void CanBoardDeInit(void);
KEY_EXTERN void TurnIsr(BYTE num);



#endif
















